#ifndef IVSNAMESPACE_H
#define IVSNAMESPACE_H

#include <QString>
#include <QList>
#include "cv.h"

#define IVS_DEBUG

namespace IVS {
enum eFunctions {Video_player,
                 Intruders_detection,
                 Restricted_area_survuillance,
                 Fence_survuillance,
                 People_counting,
                 People_tracking,
                 Theft_detection,
                 Object_left_behide_detection,
                 Camera_checks};

enum eVideoSourceType{LocalFile, Stream, LocalCAM, InvalidVideoSource};

struct VideoSource_t{
    QString sourceName;
    IVS::eVideoSourceType sourceType;
    QString source;
    QList<CvPoint> ROI;
    char charSourceName;

    const char* SourceName(){
        return sourceName.toStdString().c_str();
    }
    const char* Source(){
        return source.toStdString().c_str();
    }
};
typedef struct VideoSource_t VideoSource;
}

namespace IVSSettings {
struct Video_player_settings_t{
    bool isEnableROI;
};
struct Intruders_detection_settings_t{
    int noFrameToInitBackground;
    float alpha;
    int stateChangeDelay; // number of frame to delay when changing state
    uint bnRectArea_min;
    uint bnRectArea_max;
    int noBin;
};
struct Restricted_area_survuillance_settings_t{
    int noFrameToInitBackground;
    float alpha;
    int stateChangeDelay; // number of frame to delay when changing state
    uint bnRectArea_min;
    uint bnRectArea_max;
    int noBin;
};
struct Fence_survuillance_settings_t{

};
struct People_counting_settings_t{

};
struct People_tracking_settings_t{

};
struct Theft_detection_settings_t{

};
struct Object_left_behide_detection_settings_t{

};
struct Camera_checks_settings_t{
    int noFrameToInitBackground;
    float alpha;
    int stateChangeDelay;
    int beCoveredThreshold;
    int videoPlaySpeedBoost;
};

typedef struct Video_player_settings_t Video_player_settings;
typedef struct Intruders_detection_settings_t Intruders_detection_settings;
typedef struct Restricted_area_survuillance_settings_t Restricted_area_survuillance_settings;
typedef struct Fence_survuillance_settings_t Fence_survuillance_settings;
typedef struct People_counting_settings_t People_counting_settings;
typedef struct People_tracking_settings_t People_tracking_settings;
typedef struct Theft_detection_settings_t Theft_detection_settings;
typedef struct Object_left_behide_detection_settings_t Object_left_behide_detection_settings;
typedef struct Camera_checks_settings_t Camera_checks_settings;
}
#endif // IVSNAMESPACE_H
